package com.example.demo02.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo02.entity.Role;
import com.example.demo02.entity.TUser;

import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface TUserMapper extends BaseMapper<TUser> {
    TUser findUserByName(String username); //根据姓名查找用户User
    List<Role> findRolesByUserId(int id); //根据用户id查找角色Role集合，角色中又包含权限
}
